#pragma once

#include <QtWidgets/QMainWindow>
#include "ui_SmallImageEffect1.h"
#include "UiCommon.h"

class SmallImageEffect1 : public QWidget
{
    Q_OBJECT

public:
    SmallImageEffect1(QWidget *parent = Q_NULLPTR);
    
    QVector<EffectInfo> effectInfo();
    void setEffectInfo(QVector<EffectInfo> info);
    int currentIndex();

signals:    
    void sigView(QStringList files);

protected slots:    
    void on_btnLoadBack_clicked();
    void on_btnSelSave_clicked();
    void on_btnSelSaveAs_clicked();

    void on_boxEffect_currentIndexChanged(int index);
    void on_btnAdd_clicked();
    void on_btnDel_clicked();
    void on_btnChg_clicked();

private:            
    void uiToEffect(EffectInfo &info);
    void effectToUi(EffectInfo info);
    void updateList();

    QVector<EffectInfo>  m_effects;        
    int m_preIndex;

    Ui::SmallImageEffect1Class ui;
};
